package com.prs.crm.context;

import java.util.HashMap;
import java.util.Map;

import com.prs.crm.domain.hr.Person;

public class UserLoginStore {

	/**
	 * 根据IP存放登录用户
	 */
	private static Map<String,Person> loginUsers;
	
	static
	{
		loginUsers = new HashMap<String,Person>();
	}
	
	public static void putUser(Person person)
	{
	
		loginUsers.put(person.getLoginCode(), person);
	}
	
	public static Person getUser(String code)
	{
		return loginUsers.get(code);
	}
	
	public static void removeUser(Person person)
	{
		loginUsers.remove(person.getLoginCode());
	}
	
}
